package org.shagin.jfin.ui.editor.budget;

import java.awt.BorderLayout;
import java.awt.Dimension;

import org.shagin.jfin.core.CoreUtils;
import org.shagin.jfin.core.ui.JJFrame;
import org.shagin.jfin.data.model.IBudget;

/**
 * The Class BudgetEditorFrame.
 */
@SuppressWarnings("serial")
public class BudgetEditorFrame extends JJFrame {

    private IBudget budget;
    private BudgetEditorPane pane;

    /**
     * Instantiates a new budget editor frame.
     * 
     * @param budget the budget
     */
    public BudgetEditorFrame(IBudget budget) {
        super();
        CoreUtils.checkNotNull(budget, "budget");
        this.budget = budget;
        setLayout(new BorderLayout());
        pane = new BudgetEditorPane(budget);
        add(pane, BorderLayout.CENTER);
        // TODO SetSize
        setSize(new Dimension(500, 500));
    }

    /**
     * Gets the budget.
     * 
     * @return the budget
     */
    public IBudget getBudget() {
        return budget;
    }
}
